<!--  -->
<template>
  <div>自定义指令
    <input v-focus type="text">

    <div v-color="'red'">hello</div>

      <div v-color="'blue'">您好</div>
  </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,onMounted} from 'vue'

// const colorValue=ref('red');


// 自定义指令
const vFocus={
    mounted(el:any){
        console.log(111111111,el);
        el.focus()
        
    }
}

// const vColor={
//     mounted(el:any,binding:any){

//       const {value}=binding
//       el.style.color=value
        
    
//     }
// }
</script>
<style scoped>
</style>